import Vue from 'vue'
import App from './App.vue'
import router from './router'
import axios from "axios";
import {getRequest, postRequest} from "network/request";
// 引入全局样式
import 'assets/css/global.css';


// 引入自定义组件 toast, 注意是导入toast这个文件夹
import toast from 'components/toast';
import test from 'components/test/test';


// 将在request.js中封装的请求挂载到vue原型
Vue.prototype.postRequest = postRequest;
Vue.prototype.getRequest = getRequest;

// 安装toast插件
Vue.use(toast);

Vue.use(test);

// axios请求根路径
axios.defaults.baseURL = '/api';
Vue.config.productionTip = false;

new Vue({
  router,
  render: function (h) { return h(App) }
}).$mount('#app');
